package com.yueman.ptoolopenticket.ticket.mapper;


import com.yueman.ptoolopenticket.ticket.pojo.Sign;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

@Repository
public interface TicketSignRepository extends JpaRepository<Sign, Integer>, JpaSpecificationExecutor<Sign> {
    @Query("update Sign s set s.signflag=?2 where s.userId=?1")
    @Transactional
    @Modifying
    public Integer UpdateSignFlag(String Uid,String signflag);

    public Sign findByUserId(String uid);
}
